package com.chinasoft.book.mapper.impl;

import com.chinasoft.book.mapper.BookMapper;

public class BookMapperImpl implements BookMapper {

    public BookMapperImpl() {
        System.out.println("bookMapper层创建, 构造方法被调用了");
    }

    public BookMapperImpl(int age) {
       // null;
    }

    @Override
    public String selectById(Integer id) {
        System.out.println("dao层 根据 id 查询数据");
        return "红楼梦 。。。";
    }

    // 在 bean对象被创建之后
    public void init() {
        System.out.println("bookMapper bean 被初始化了");
    }

    public void destroy() {
        System.out.println("bookMapper bean 被销毁了");
    }
}
